﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace RadarGlobalPro.GUIView
{
    public partial class Status : UserControl
    {
        Popup myPopup;
        //bool remove = false;
        public Status()
        {
            InitializeComponent();
            myPopup = new Popup();
            myPopup.Child = this;
            FakeOut.Completed += (s, args) =>
            {
                myPopup.IsOpen = false;
            };
        }
        public void ShowPopup(string StatusText)
        {
            SetStatus(StatusText);
            myPopup.IsOpen = true;
            FakeIn.Begin();
        }
        public void Remove()
        {
            myPopup.IsOpen = false;
        }
        public void Abort()
        {
            FakeOut.Begin();
        }
        public void SetStatus(string text)
        {
            this.textBlock.Text = text;
        }
    }
}
